﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="uc_ChiPhi_NhapHang_View.ascx.cs"
    Inherits="Cost_UserControl_uc_ChiPhi_NhapHang_View" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<script type="text/javascript">
    function OnKey(obj) {
        var grid = document.getElementById("<%= grdList.ClientID %>");
        var cell;
        if (grid.rows.length > 0) {
            for (i = 1; i < grid.rows.length; i++) {
                cell = grid.rows[i].cells[6];
                if (cell.innerHTML.indexOf(obj.value) < 0)
                    grid.rows[i].setAttribute("style", "display:none;");
                else
                    grid.rows[i].setAttribute("style", "");
            }
        }
    }
</script>
<style type="text/css" media="print">
    .jwts_tabbernav
    {
        display: none;
    }
</style>
<script type="text/javascript">    var jwts_slideSpeed = 30; var jwts_timer = 10;</script>
<div style="min-height: 800px; height: 100%;">
    <div class="TitlePage">
        CẬP NHẬT INVOICE</div>
    <asp:Panel runat="server" ID="Panel1">
        <div style="text-align: left; width: 100%">
            <fieldset>
                <table width="100%">
                    <tr>
                        <td class="tdsearch1">
                        </td>
                        <td align="left" class="tdsearch2">
                            Số vận đơn <span style="color: Red">(*)</span>:
                        </td>
                        <td align="left" class="tdsearch3">
                            <asp:TextBox runat="server" ID="txtSoVanDon" MaxLength="50" CssClass="txtBox" Width="200px"
                                ReadOnly="true"></asp:TextBox>
                        </td>
                        <td class="tdsearch4">
                        </td>
                        <td align="left" class="tdsearch5">
                        </td>
                        <td align="left" class="tdsearch6" style="margin-right: 5px">
                        </td>
                        <td class="tdsearch7">
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="7">
                            <asp:Label ID="lblAlerting" runat="server" CssClass="Alerting"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="7">
                            <asp:Button CssClass="btn_admin" ID="btnSave" runat="server" Text="Cập nhật" OnClick="btnSave_Click" />
                        </td>
                    </tr>
                </table>
            </fieldset>
        </div>
    </asp:Panel>
    <div style="clear: both; height: 10px">
    </div>
    <div>
        <div id="divSearchList1">
            <asp:GridView ID="grdList" runat="server" AllowPaging="True" AutoGenerateColumns="false"
                CssClass="grid" Width="100%" PageSize="10000">
                <Columns>
                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" ControlStyle-Width="40px">
                        <ItemTemplate>
                            <asp:CheckBox ID="chkSave" runat="server" Checked='<%# Eval("ISCHECK") %>' />
                            <asp:HiddenField ID="hdfID" runat="server" Value='<%# Eval("DocEntry") %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="AP Reserve No" ControlStyle-Width="60px" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <asp:Label ID="lblListingDocEntry" runat="server" Text='<%# Eval("DocEntry") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Mã NCC" ControlStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                        <ItemTemplate>
                            <asp:Label ID="lblListingMaNhaCungCap" runat="server" Text='<%# Eval("CardCode") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tên nhà cung cấp" ControlStyle-Width="200px">
                        <ItemTemplate>
                            <asp:Label ID="lblListingTenNhaCungCap" runat="server" Text='<%# Eval("CardName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="TSL" ControlStyle-Width="70px" ItemStyle-HorizontalAlign="Right">
                        <ItemTemplate>
                            <asp:Label ID="lblListingTTSL" runat="server" Text='<%# string.Format("{0:N0}", Eval("TSL")) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="TS Tiền" ControlStyle-Width="70px" ItemStyle-HorizontalAlign="Right">
                        <ItemTemplate>
                            <asp:Label ID="lblListingTST" runat="server" Text='<%# string.Format("{0:N0}", Eval("TST")) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:TextBox ID="txtHoaDonHeader" runat="server" BorderStyle="None" BackColor="Transparent"
                                CssClass="txtISBNHeader" onkeyup="OnKey(this);"></asp:TextBox>
                            <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="txtHoaDonHeader"
                                WatermarkText="Số hóa đơn">
                            </asp:TextBoxWatermarkExtender>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <%#  Eval("SOHOADON") %>'
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <PagerStyle CssClass="pager" HorizontalAlign="Right" />
            </asp:GridView>
        </div>
    </div>
</div>
<asp:HiddenField ID="hdfMasterID" runat="server" />
